A portion of the disclosure of this patent document contains material which is subject to copyright protection. The copyright owner has no objection to the facsimile reproduction by anyone of the patent document or the patent disclosure, as it appears in the Patent and Trademark Office patent file or records, but otherwise reserves all copyright rights whatsoever.
The present invention relates generally to computer graphics, and more specifically, to implementing stack extensions in a computer graphics application.
Computer generated 3-D modeling and animation enrich a wide range of human experiences that includes everything from captivating audiences at the movie theaters, to gluing gamers to their video games, to embarking home buyers on virtual tours of new homes. To generate 3-D models and/or animations, a 3-D designer interacts with a 3-D modeling program, such 3D Studio Max(trademark), which is commercially available from Autodesk, Inc., to define objects for importing into a computer graphic application, such as a game engine. As part of creating an object, the designer typically defines a base object, for example a sphere or box, and then applies one or more modifiers to the base object to create a rendered object that can then be exported into a graphic application.
For example, to create an object, an animator (xe2x80x9cuserxe2x80x9d) may interact with a conventional modeling and/or animation program to define a base object by selecting a particular base object type from a set of predefined object types and by entering and/or selecting a set of parameter values that are to be used to define the specific characteristics of the base object. Next, using the modeling program, the user may define one or more modifiers that are to be applied to the base object for modifying certain characteristics and/or attributes of the base object. Thereafter, once the user is satisfied with the generated object, the object can then be exported for use in a graphics application.
For example, FIGS. 1A-1C illustrate a conventional modeling program interface 100 that can be used to generate an object that includes a set of desired characteristics and/or attributes. As illustrated in window 108 of FIG. 1A, by interacting with a modeling program interface 100, a user may create a base object 110 by selecting a particular type of object (for example a sphere object) from a creation panel (not shown). Once the object is created, the objects parameters can be edited using either the creation panel (not shown) or through an object parameter menu 104. In this example, a modifier stack window 106 provides a visual representation of an underlying modifier stack 105 that depicts the base object 110 and any modifiers that have been selected for modifying the base object 110. Conventionally, the modifier stack provides a sequential hierarchical order for which the modifiers, if any, are to be applied to a base object.
Once a base object is defined, the user may apply one or more modifiers to modify the characteristics/attributes of the base object 110. For example, the user may select a bend modifier button 112 and enter bend parameter data in a bend parameter menu 114 to define a bend modifier for applying to base object 110, which may be referred to as a sphere object, to create a sphere/bend object 116 as depicted in window 108 of FIG. 1B. In particular, in response to the user defining the bend modifier, the bend modifier is inserted into the underlying modifier stack as illustrated in modifier stack 105 in modifier stack window 106 of FIG. 1B. Once inserted, the bend modifier is applied to the sphere object 110 to generate sphere/bend object 116 as depicted in window 108 of FIG. 1B.
After applying the bend modifier the user may apply additional modifiers to modify the characteristics/attributes of the sphere/bend object 116. For example, the user may select a taper modifier button 118 and enter taper parameter data in a taper parameter menu 120 to define a taper modifier for applying to the sphere/bend object 116 to create a sphere/bend/taper object 122 as depicted in window 108 of FIG. 1C. More specifically, in response to the user defining the taper modifier, the taper modifier is added to the underlying modifier stack as illustrated in modifier stack 105 in modifier stack window 106 of FIG. 1C. Once inserted, the taper modifier is applied to the sphere/bend object 116 to generate sphere/bend/taper object 122 as depicted in window 108 of FIG. 1C.
FIG. 1D illustrates a conventional underlying modifier stack 150 (as presented to the user as modifier stack 105 in modifier stack window 106 of FIG. 1C) that is used to render sphere/bend/taper object 122 in FIG. 1C. In this example, modifier stack 150 includes sphere object data 152, bend modifier data 154, taper modifier data 156 and a node world-state cache data (wscache) 158. Modifier stack 150 maintains a hierarchical order that is used in evaluating the different objects and modifiers within the stack. For example, in evaluating modifier stack 150, the lower-ordered bend modifier data 154 is applied or evaluated prior to the higher-ordered taper modifier data 156.
In this example, node wscache data 158 represents the cached result of the modifier stack evaluation. Sphere object data 152 describes the base object selected by the user while bend modifier data 154 and taper modifier data 156 describe the modifications that are to be respectively applied as the object is passed-up the modifier stack 150. For example, in evaluating modifier stack 150, a geometry type is first selected for rendering the particular object. For explanation purposes, it shall be assumed that a geometry type of mesh is selected for rendering the object. To render the object, an initial mesh object is first generated based on the properties and/or constraints that were defined in sphere object data 152 (for example, base object 110 in FIG. 1A). Next, the mesh object is passed up the modifier stack. 150 where bend modifier data 154 is then applied to a copy of the initial mesh object to create an updated mesh object (for example, sphere/bend object 116). Next, the updated mesh object is passed up the modifier stack 150 where taper modifier data 156 is then applied to a copy of the updated mesh object to further update the mesh object (for example, sphere/bend/taper object 122). Finally, the updated mesh object is passed up the modifier stack 150 to the node and gets stored in the node wscache data 158 which causes the object (sphere/bend/taper object 122) to be rendered in window 108 as illustrated in FIG. 1C.
Using a modifier stack for modeling objects is generally referred to as non-destructive modeling in that each change is reapplied or reevaluated in their specific order whenever a change is made to an object or a modifier within the modifier stack. For example, if the user redefines the dimensions of the xe2x80x9clower-orderedxe2x80x9d sphere object data 152, xe2x80x9chigher-orderedxe2x80x9d bend modifier data 154 and taper modifier data 156 are sequentially reapplied to the newly defined mesh object prior to being displayed to the user by the node wscache data 158. Additional examples of how modifier stacks may be used to render 3-D objects is provided in U.S. Pat. No. 6,061,067, entitled APPLYING MODIFIERS TO OBJECTS BASED ON THE TYPES OF THE OBJECTS; U.S. Pat. No. 6,195,098, entitled SYSTEM AND METHOD FOR INTERACTIVE RENDERING OF THREE DIMENSIONAL OBJECTS; U.S. Pat. No. 5,995,107, entitled CACHING IN A THREE DIMENSIONAL MODELING AND ANIMATION SYSTEM; U.S. Pat. No. 6,034,695 entitled THREE DIMENSIONAL MODELING AND ANIMATION SYSTEM; U.S. Pat. No. 6,184,901 entitled THREE DIMENSIONAL MODELING AND ANIMATION SYSTEM; and U.S. patent application Ser. No. 09/286,133 entitled TRANSLATING OBJECTS BETWEEN SOFTWARE APPLICATIONS WHICH EMPLOY DIFFERENT DATA FORMATS.
However, a drawback with using a conventional modifier stack to render an object is that certain attributes and/or properties that were defined at a lower level in the modifier stack no longer influence, or may not even make sense, at a higher level in the modifier stack. For example, the sphere object data 152 may include a constraint that requires that no face on the created mesh object is to be smaller than a particular size. Thus, when creating the initial mesh object based on sphere object data 152, the constraint guarantees that the initial mesh object will be created without any faces that are smaller than the particular required size. However, the size constraint that is defined by sphere object data 152 is lost, and thus no longer active once the initial mesh object is created. Therefore, when the copy of the initial mesh object is updated based on the bend modifier data 154, the constraint information that was defined by sphere object data 152 no longer influences how the mesh object is modified. Thus, the updated mesh object that is created from applying the bend modifier data 154 may now include one or more faces that are smaller than the required size limit.
In addition, certain properties, such as the number of faces that are contained within a mesh object may dynamically change as a mesh object is passed up the modifier stack. Thus, attributes that are applied at a lower level to specific faces of the mesh object may become problematic if the faces are later removed and/or combined with other faces at a higher level in the modifier stack. For example, a base object data may require that a friction value of xe2x80x9c10xe2x80x9d is to be associated with face xe2x80x9c100xe2x80x9d while a friction value of xe2x80x9c4xe2x80x9d is to be associated with face xe2x80x9c101xe2x80x9d within the mesh object. However, if in passing the initial mesh object up the modifier stack a subsequent modifier causes faces xe2x80x9c100xe2x80x9d and xe2x80x9c101xe2x80x9d to be combined into a single face, what, or even if, a particular friction value is be associated with the single face of the updated mesh object becomes problematic, if not indeterminable at higher levels within the modifier stack.
Based on the foregoing, there is a clear need for a mechanism that allows constraints and/or properties that were assigned at a lower level of a modifier stack to influence how modifiers are to be applied at higher levels within the modifier stack.
A method and apparatus are provided for implementing stack extensions in a modifier stack that is associated with a plurality of components that are sequentially applied to a geometry object when the modifier stack is evaluated. According to one aspect of the invention, an extension channel object is attached to the geometry object. The extension channel object is associated with a notification mechanism that notifies the extension channel object if a particular event occurs while the modifier stack is being evaluated. In response to receiving a notification that one of the plurality of components has caused a particular event to occur while the modifier stack is being evaluated, the extension channel object influences how the geometry object is modified by the component within the modifier stack.
The invention also encompasses a computer-readable medium, a computer data signal embodied in a carrier wave, and an apparatus configured to carry out the foregoing steps. Other features and aspects will become apparent from the following description and the appended claims.